<!--
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-02-03 14:41:20
 * @LastEditTime: 2023-11-07 15:28:29
 * @LastEditors: 孙开源 && sunkaiyuan@namenode.cn
 * @Description:   :gridOps="gridOptions" 
-->
<template>
  <sc-VxeTable
    ref="xGrid1"
    :gridEvts="gridEvents"
    :tablecode="'storageActionAuxiliaryPurchase_finance'"
    :url="this.$API.purchase.storage.list"
  >
  </sc-VxeTable>
  <save
    v-if="dialog.save"
    ref="save"
    @success="handleSuccess"
    @closed="dialog.save = false"
  >
  </save>
</template>
<script>
import save from "./save";
export default {
  name: "storageActionPurchaseAuxiliary_finance",
  components: {
    save,
  },
  data() {
    return {
      dialog: {
        save: false,
      },
      gridEvents: {
        cellDblclick: ({ row }) => {
          this.save(row);
        },
      },
    };
  },
  methods: {
    handleSuccess() {
      this.$refs.xGrid1.refresh();
    },
    save(selected) {
      this.dialog.save = true;
      this.$nextTick(() => {
        this.$refs.save.open("edit").setData(selected);
      });
    },
  },
};
</script>
